<template>
  <div class="app">
    <h1>App.vue根组件</h1>
    <hr />
    <Box1 :count="list.count"></Box1>
    <Box2 :count="list.count"></Box2>
  </div>
</template>

<script>
import Box1 from './components/box1.vue'
import Box2 from './components/box2.vue'
export default {
  data() {
    return {
      list: {
        id: 0,
        count: 1
      }
    }
  },
  // 注册组件节点
  components: {
    Box1,
    Box2
  }
}
</script>

// lang="less" 支持less语法
<style lang="less">
* {
  //支持css3写法 vue样式必填
  box-sizing: border-box;
}
.app {
  height: 80px;
  background: #d9d9d9;
}
</style>
